

#ifndef UCPLOBJECT_H
#define UCPLOBJECT_H

#include "zrxobject.h"
#include "zAcHeapOpers.h"

class UcPlObjectImp;
class UcPlSystemInternals;

class ZSOFT_NO_VTABLE UcPlObject : public UcRxObject, public UcHeapOperators
{
public:
    UCRX_DECLARE_MEMBERS(UcPlObject);
    
    UCPL_PORT virtual ~UcPlObject();

protected:
    UcPlObject();
    UcPlObject(UcPlSystemInternals*);

private:
    friend class UcPlSystemInternals;
    UcPlObjectImp*  mpPlObjectImp;
};

#define UCPL_DECLARE_MEMBERS(CLASS_NAME) \
private: \
    friend class UcPlSystemInternals; \
protected: \
    CLASS_NAME(UcPlSystemInternals*); \
public: \
    UCPL_PORT virtual UcRxClass* isA() const; \
    UCPL_PORT static UcRxClass* gpDesc; \
    UCPL_PORT static UcRxClass* desc(); \
    UCPL_PORT static CLASS_NAME* cast(const UcRxObject* inPtr) \
        { return ((inPtr == NULL) || !inPtr->isKindOf(CLASS_NAME::desc())) \
          ? NULL : (CLASS_NAME*)inPtr; }; \
    UCPL_PORT static void rxInit(); \
    UCPL_PORT static void rxInit(AppNameChangeFuncPtr);

#define UCPL_DEFINE_MEMBERS(CLASS_NAME, BASE_CLASS) \
UCRX_NO_CONS_DEFINE_MEMBERS(CLASS_NAME, BASE_CLASS) \
CLASS_NAME::CLASS_NAME(UcPlSystemInternals* pInternals) \
: BASE_CLASS(pInternals) \
{ \
}
        
#endif 
